1. Field of the Invention
The present invention relates to an image processing program and an image processing apparatus, and more specifically to an image processing program and an image processing apparatus for displaying an image representing two objects appearing in a three-dimensional virtual space colliding against each other.
2. Description of the Background Art
Conventionally in a technological field of constructing a virtual space in which objects (characters) appear, causing the objects to perform motions, and displaying a moving picture representing the motion of the objects, the motions of the objects are controlled to look realistic. For example, there is a video game apparatus for causing a player character operated by a player to perform naturally-looking motions (see, for example, Japanese Laid-Open Patent Publication No. 2002-253848). With this video game apparatus, a detectable object is located in a game space. In the case where the player character exists within a predetermined distance from the detectable object, the motion of the player character is controlled such that the player character performs a motion of turning its face toward the detectable object. This motion is performed regardless of whether or not the detectable object is displayed on the screen. Therefore, this motion allows the player to learn the existence of the object which is not displayed on the screen. In addition, the player character is caused to perform a naturally-looking motion of “noticing the existence of the object and turning toward the object”, so that the motion of the player character can be represented more realistically.
Here, a case where the object collides against the player character will be described. In this case, in order to represent the motion of the player character realistically, the player character can be caused to perform a motion of turning toward the object which has collided against the player character.
According to the above-described conventional technology, when the player character comes within a predetermined distance from the detectable object, the player character performs a motion of turning toward the detectable object. However, the object may possibly collide against the player character from behind the player character. Alternatively, for example, the player character may possibly be attacked by an enemy character from behind. If the conventional technology is used for such cases, the player character performs a motion of turning back when an object approaches from behind. Namely, the player character performs a motion of turning in any direction toward an object approaching the player character (i.e., a motion of noticing any object approaching the player character), which is unrealistic and unnatural. As can be appreciated from the above, if the conventional technology is used when an object collides against the player character, the motion of the player character cannot represented realistically.
In the case where the player character is caused to perform a motion of turning toward an object approaching the player character, it should be determined whether or not the object and the player character have actually collided against each other. The above-described conventional technology, however, can only detect the distance between the object and the player character. Therefore, it cannot be accurately detected whether or not the object and the player character have actually collided against each other.